package homework;
import java.util.*;
public class CalculatorSwitch {
public static void main(String args[]){
	
	System.out.println("Enter any two numbers:");
	Scanner s=new Scanner(System.in);
	double a=s.nextDouble();
    s=new Scanner(System.in);
    double b=s.nextDouble();
    System.out.println("1 is for addition:");
	System.out.println("2 is for substraction:");
	System.out.println("3 is for multiplication:");
	System.out.println("4 is for division:");
   System.out.println("Enter the operation you want to perform:");
   s=new Scanner(System.in);
   int choice=s.nextInt();
   
   if(choice>0 && choice<5){
   
	   switch(choice){
   case 1:
          System.out.println("Addition of "+ a +" and "+ b +" is: "+ (a+b));
	  break;
   case 2:
	   System.out.println("Substraction  of "+ a +" and "+ b +" is: "+ (a-b));
	   break;
	   
   case 3:
	   System.out.println("Multiplication of "+ a +" and "+ b +" is: "+ (a*b));
	   break;
   case 4:
	   System.out.println("Division  of "+ a +" and "+ b +" is: "+ (a/b));
	   break;
	   
   }
   }
   else
	   System.out.println("Enter 1 or 2 or 3 or 4:");
    
}
}
